Карта сайта Интеллектуальная поисковая системаДобавить свою ссылку по ключевому запросуПоисковая система v3.kz поможет ускорить индексацию вашего сайта выводит в Топ |
|
hook_init. Drupal 5. Drupal 6. Хочешь помочь с переводом? Это очень просто и быстро. hook_init runs once per-page request, for non-cached pages. See _drupal_bootstrap_full. То есть у нас есть событие: создание пользователя. hook_init запускается всегда перед началом инициализации страницы, а вот hook_menu запускается каждый раз при очистки кеша и с его помощью можно внедрить в Друпал свои страницы. 90 functions implement hook_init(). Allow modules to interact with the Drupal core. 13 functions implement hook_init(). Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook. D8 beta is launched and its time to port modules from Drupal 7 to Drupal 8. One of the very widely used hooks hook_init() has been removed from Drupal 8. This has been replaced in favor of Symfony Kernel and events. Hook_init wont be run on cached pages, that is probably what you are seeing. If you want to run code even on cached pages you should use hook_boot, but be careful not to do something expensive, as it can become a huge performance hit. События которые срабатывают до init So is drupal_add_js also disabling the cache? I even tried using a simple echo statement in hook_init() and it still seemed to echo a random number. So are all these things causing the page not to be cached or does hook_init() still get run somehow? hook_boot hook_init Even cached page executes this hook Cached page doesnt run this hook. Информация взята v3.kz |
загрузка...
|